package com.qf.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.entity.User;
import com.qf.mapper.UserDao;
import com.qf.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findUserByPhone(String phone) {

        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("phone",phone);
        User user = userDao.selectOne(wrapper);

        return user;
    }
}
